import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue";
import Login from "../views/Login.vue";
import Register from "../views/Register.vue";
import personIndex from "../views/person/Index.vue";
import personExit from "../views/person/Exit.vue";
import particulars from "../views/Particulars.vue";
import attention from "../views/person/attention.vue";
import follow from "../views/person/follow.vue";
import collect from "../views/person/collect.vue";
Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "Home",
    component: Home
  },
  // 登录
  {
    path: "/login",
    component: Login
  },
  // 注册
  {
    path: "/register",
    component: Register
  },
  // 个人中心
  {
    path: "/person",
    component: personIndex
  },
  // 个人编辑
  {
    path: "/personExit",
    component: personExit
  },
  // 详情页
  {
    path: "/particulars",
    component: particulars
  },
  // 我的关注
  {
    path: "/attention",
    component: attention
  },
  // 我的跟帖
  {
    path: "/follow",
    component: follow
  },
  // 我的收藏
  {
    path: "/collect",
    component: collect
  }
];

const router = new VueRouter({
  routes
});

export default router;
